package edu.unf.cen6940.converter;

import java.text.ParseException;
import java.util.Locale;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.Formatter;
import org.springframework.stereotype.Component;

import edu.unf.cen6940.dao.ResearchkeywordDAO;
import edu.unf.cen6940.domain.Researchkeyword;

@Component
public class ResearchkeywordConverter implements Formatter<Researchkeyword>{
	@Autowired
	ResearchkeywordDAO researchkeywordDAO;

	@Override
	public String print(Researchkeyword arg0, Locale arg1) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Researchkeyword parse(String arg0, Locale arg1)
			throws ParseException {
		return researchkeywordDAO.findResearchkeywordByResearchKeywordId(Integer.parseInt(arg0));
	}

}
